package com.lucyyun.lcconsumer;


import com.lucyyun.lcrpccore.config.RpcConfig;
import com.lucyyun.lcrpccore.proxy.ServiceProxyFactory;
import com.lucyyun.lcrpccore.utils.ConfigUtils;
import com.lucyyun.lucycommon.model.User;
import com.lucyyun.lucycommon.service.Userservice;


/**
 * Description
 *
 * @author: lucyYun
 * @date: 2024/6/23 17:01
 */
public class EasyConsumerExample {
    public static void main(String[] args) {
        Userservice userservice = ServiceProxyFactory.getProxy(Userservice.class);
        User user = new User();
        user.setName("lc");
        User newUser = userservice.getUser(user);
        if (newUser != null) {
            System.out.println(newUser.getName());
        } else {
            System.out.println("user==null");
        }
        short number = userservice.getNumber();
        System.out.println(number);
        //        ============================================================
//        RpcConfig rpc = ConfigUtils.loadConfig(RpcConfig.class,"rpc");
//        System.out.println(rpc);
        //        ============================================================
        
        
    }
}
